<?php /* Smarty version Smarty-3.0.7, created on 2017-06-01 09:24:51
         compiled from "C:\wamp\www\gongzhonghao.yuanfenba.net/modules/admin/tpl/wechat/list.tpl" */ ?>
<?php /*%%SmartyHeaderCode:6440592f6ce3856644-82044978%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '02a0ff73e4967aec7d31fd4a4cfb4497eca59b03' => 
    array (
      0 => 'C:\\wamp\\www\\gongzhonghao.yuanfenba.net/modules/admin/tpl/wechat/list.tpl',
      1 => 1496280090,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '6440592f6ce3856644-82044978',
  'function' => 
  array (
  ),
  'has_nocache_code' => false,
)); /*/%%SmartyHeaderCode%%*/?>
<?php $_template = new Smarty_Internal_Template('header.tpl', $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate();?><?php unset($_template);?>
<style>
    tbody td {
        text-align: center;
    }
    tbody .summary td {
        background: #ddd;
        color: red;
    }
    #preview {
        position: absolute;
        border: 1px solid #ccc;
        background: #333;
        padding: 5px;
        display: none;
        color: #fff;
    }
</style>
<form method="get" action="/admin/wechat/list" class="form-inline">
    <table class="fTable">
        <tbody>
        <tr>
            <th>公众号ID</th>
            <td style="width: 150px;"><input name="s_id" value="<?php echo $_GET['s_id'];?>
" style="width: 140px;" type="text"></td>
            <td><button class="btn btn-sm btn-default" type="submit">查找</button></td>
            <td><a class="btn btn-success btn-sm"  href="/admin/wechat/modify" rel="ajax">添加公众号</a></td>
        </tr>
        </tbody>
    </table>
</form>
<div class="clearfix" style="height:30px;"></div>

<table class="fTable" style="width: 100%">
    <thead>
    <tr>
        <th >ID</th>
        <th >公众号名称</th>
        <th >简介</th>
        <th>二维码</th>
        <th >公司主体</th>
        <th >运营者</th>
        <th >运营者身份证号</th>
        <th >运营者电话号码</th>
        <th >认证状态</th>
        <th >域名</th>
        <th >域名名称</th>
        <th >维护人员</th>
        <th >appid</th>
        <th >appsecret</th>
        <th >encodingaeskey</th>
        <th >令牌</th>
        <th >日期</th>
        <th >操作</th>
    </tr>
    </thead>
    <tbody>
    <?php  $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('list')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if ($_smarty_tpl->_count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value){
?>
        <tr>
            <td><?php echo $_smarty_tpl->tpl_vars['item']->value['wid'];?>
</td>
            <td><?php echo $_smarty_tpl->tpl_vars['item']->value['name'];?>
</td>
            <td><?php echo $_smarty_tpl->tpl_vars['item']->value['intro'];?>
</td>
            <td>
                <a  href="<?php echo Service_Attach::getInstance()->getThumbUrl($_smarty_tpl->tpl_vars['item']->value['qrcode']);?>
" target="_blank" class="preview" rel="<?php echo Service_Attach::getInstance()->getThumbUrl($_smarty_tpl->tpl_vars['item']->value['qrcode'],192,192);?>
">
                    <img src="<?php echo Service_Attach::getInstance()->getThumbUrl($_smarty_tpl->tpl_vars['item']->value['qrcode'],150,150);?>
" style="width: 40px;" />
                </a>
            </td>
            <td><?php echo $_smarty_tpl->tpl_vars['item']->value['company'];?>
</td>
            <td><?php echo $_smarty_tpl->tpl_vars['item']->value['operator'];?>
</td>
            <td><?php echo $_smarty_tpl->tpl_vars['item']->value['card'];?>
</td>
            <td><?php echo $_smarty_tpl->tpl_vars['item']->value['mobile'];?>
</td>
            <td><?php if ($_smarty_tpl->tpl_vars['item']->value['status']==1){?>已认证<?php }elseif($_smarty_tpl->tpl_vars['item']->value['status']==2){?>未认证<?php }else{ ?><?php }?></td>
            <td><?php echo $_smarty_tpl->tpl_vars['item']->value['domain'];?>
</td>
            <td><?php echo $_smarty_tpl->tpl_vars['item']->value['domain_name'];?>
</td>
            <td><?php echo $_smarty_tpl->tpl_vars['item']->value['sevicer'];?>
</td>
            <td><?php echo $_smarty_tpl->tpl_vars['item']->value['appid'];?>
</td>
            <td><?php echo $_smarty_tpl->tpl_vars['item']->value['appsecret'];?>
</td>
            <td><?php echo $_smarty_tpl->tpl_vars['item']->value['encodingaeskey'];?>
</td>
            <td><?php echo $_smarty_tpl->tpl_vars['item']->value['token'];?>
</td>
            <td><?php echo $_smarty_tpl->tpl_vars['item']->value['create_time'];?>
</td>
            <td>
                <a href="/admin/wechat/modify?id=<?php echo $_smarty_tpl->tpl_vars['item']->value['wid'];?>
" rel="ajax">编辑</a>
                <a  onclick="delete_union(<?php echo $_smarty_tpl->tpl_vars['item']->value['wid'];?>
)" href="javascript:;" >删除</a>
            </td>
        </tr>
    <?php }} ?>
    </tbody>
</table>

    <script>
        $(document).ready(function () {
            imagePreview();
        });
        this.imagePreview = function () {
            /* CONFIG */

            xOffset = 10;
            yOffset = 30;

            // these 2 variable determine popup's distance from the cursor
            // you might want to adjust to get the right result

            /* END CONFIG */
            $("a.preview").hover(function (e) {
                    this.t = this.title;
                    this.title = "";
                    var c = (this.t != "") ? "<br/>" + this.t : "";
                    $("body").append("<div id='preview'><img src='" + this.rel + "' alt='Image preview' />" + c + "</div>");
                    $("#preview")
                        .css("top", (e.pageY - xOffset) + "px")
                        .css("left", (e.pageX + yOffset) + "px")
                        .fadeIn("fast");
                },
                function () {
                    this.title = this.t;
                    $("#preview").remove();
                });
            $("a.preview").mousemove(function (e) {
                $("#preview")
                    .css("top", (e.pageY - xOffset) + "px")
                    .css("left", (e.pageX + yOffset) + "px");
            });
        };


        function delete_union(id){
            var flag = confirm('删除记录，是否继续？');
            if (flag) {
                location.href="/admin/wechat/delete?id=" + id;
            }
        }

    </script>

<?php $_template = new Smarty_Internal_Template("pager.tpl", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate();?><?php unset($_template);?>
<?php $_template = new Smarty_Internal_Template('footer.tpl', $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate();?><?php unset($_template);?>